/**
 * 数据模型
 */
declare namespace IModel {
    //首页推荐
    export interface Recommend {
        id: string;
        title: string;
        desc: string;
        cover: string;
        progress: number;
        users: string[];
    }

    export interface Book {
        id: string;
        title: string;
        desc: string;
        cover: string;
        read_count: number;
        tags: string[];
        user: string;
        price: number;
        grade: number;
    }
}

declare namespace API {
    //http请求结果
    export interface Response {
        data: ResponseData,
        errMsg: string,
        statusCode: number,
        header: any
    }

    //API接口返回数据
    export interface ResponseData {
        code: number;
        data: any;
        status: string;
    }

    export interface Error extends ErrorConstructor {
        code: number;
        text: string;
        data: any;
        status: string;
    }
}
